/*************************************************************************
 Copyright (C) Unpublished Unis Software, Inc. All rights reserved.
 Unis Software, Inc., Confidential and Proprietary.

 This software is subject to copyright protection
 under the laws of the Public of China and other countries.

 Unless otherwise explicitly stated, this software is provided
 by Unis "AS IS".
 *************************************************************************/
package com.unis.service.attach;

import java.util.List;

import com.unis.model.BaseModel;
import com.unis.model.attach.AttachLink;
import com.unis.model.attach.Attachment;

/**
 * @author CSJ (email:raulcsj@163.com)
 * @since 2013-03-07
 */
public interface AttachmentService {

    /****************************************
     * Insert a instace of Attachment
     ****************************************/
    void insert(Attachment attachment) throws Exception;

    /****************************************
     * Insert instaces of Attachment
     ****************************************/
    void batchInsert(List<BaseModel> attachments) throws Exception;

    /****************************************
     * Delete a instace of Attachment
     ****************************************/
    void delete(Attachment attachment) throws Exception;

    /****************************************
     * Delete instaces of Attachment
     ****************************************/
    void batchDelete(Attachment attachment) throws Exception;

    /****************************************
     * Update a instace of Attachment
     ****************************************/
    void update(Attachment attachment) throws Exception;

    /****************************************
     * Query instaces of Attachment
     ****************************************/
    List<BaseModel> queryAsList(Attachment attachment) throws Exception;
    /****************************************
     * Query instaces of Attachment
     ****************************************/
    List<BaseModel> querybyEntityid(AttachLink attachlink) throws Exception;
    /****************************************
     * Query a instaces of Attachment
     ****************************************/
    BaseModel queryAsObject(Attachment attachment) throws Exception;
}
